use axum::{ extract::Multipart, Json };
use serde_json::Value;
// 单文件上传
pub async fn upload(multipart: Multipart) -> Result<Json<Value>, Json<Value>>{
    com::file::upload::upload_file::upload(multipart, false).await
}
// 多文件上传
pub async fn uploads(multipart: Multipart) -> Result<Json<Value>, Json<Value>>{
    com::file::upload::upload_file::upload(multipart, true).await
}

pub async fn mg_upload(multipart: Multipart) -> Result<Json<Value>, Json<Value>>{
    com::mdb::gridfs::upload_gridfs::upload(multipart, false).await
}
// 多文件上传
pub async fn mg_uploads(multipart: Multipart) -> Result<Json<Value>, Json<Value>>{
    com::mdb::gridfs::upload_gridfs::upload(multipart, true).await
}